// 简易版, 强制代码在下个宏任务执行, 避免获取不到 dom 元素
export const nextTick = (callback) => {
    return new Promise(resolve => {
        setTimeout(() => {
            callback && callback()
            resolve()
        }, 0);
    })
}